
<h3 class="page-header">订单记录
<!-- <a href="" class="ajax-modal-sm">+</a> -->
</h3>

<div class="table-responsive">
<table class="table table-hover table-bordered">
<thead>
<tr>
	<th>策划人</th>

	<th width="200">项目名称</th>

	<th>策划方案</th>
	<th>提交时间</th>
    <th>添加职位</th>
    <th>添加器材</th>
    <th>制作风格</th>
    <th>添加职位特性</th>
    <th>已有职位</th>
	<th width="150">确认状态</th>
</tr>
</thead>
<tbody id="cat-list">
<?php foreach ($order as $item):?>
<tr>
	<td><?= $item['username'] ?></td>
	<td><?= $item['project_name'] ?></td>
<!--	<td></td>-->

<td><a href="<?= $item['file_name'] ?>">下载观看</a></td>
	<td><?= date('Y-m-d',$item['create_time']) ?></td>
    <td>
        <a href="<?= URL::site('plan/addPosition?id='.$item['project_id']);?>" class="btn btn-info btn-xs ajax-modal-sm">修改</a>
        <a href="<?= URL::site('plan/updatePosition?id='.$item['project_id']);?>" class="btn btn-info btn-xs ajax-modal-sm">查看添加职位</a>
    </td>
    <td>
        <a href="<?= URL::site('plan/addEquipment?id='.$item['project_id']);?>" class="btn btn-info btn-xs ajax-modal-sm">修改</a>
        <a href="<?= URL::site('plan/updateDevice?id='.$item['project_id']);?>" class="btn btn-info btn-xs ajax-modal-sm">查看添加器材</a>

    </td>
    <td>
        <select class="form-control Shooting" name="Shooting" data-pid =<?= $item['project_id'] ?> style="width: 100px" >
            <option value="1" <?php if($item['shooting_style'] ==1) :?>selected="selected" <?php endif;?>>实拍 </option>
            <option value="2" <?php if($item['shooting_style'] ==2) :?>selected="selected" <?php endif;?>>实拍+动画 </option>
            <option value="3" <?php if($item['shooting_style'] ==3) :?>selected="selected" <?php endif;?>>动画 </option>
        </select>
    </td>
    <td>
        <a href="<?= URL::site('plan/add_Label?id='.$item['project_id']);?>" class="btn btn-info btn-xs ajax-update">添加标签</a>
    </td>
    <td width="180px">
        <?= $item['u_name'] ?>
    </td>

	<td>
        <?php if ($item['producer_state']=='1'):?>
            <a href="<?= URL::site('plan/disable?id='.$item['id']);?>" class="btn btn-info btn-xs ajax-update">已确认</a>&nbsp;&nbsp;&nbsp;
        <?php else:?>
            <a href="<?= URL::site('plan/enable?id='.$item['id']);?>" class="btn btn-danger btn-xs ajax-update">未确认</a>&nbsp;&nbsp;&nbsp;
        <?php endif;?>
	</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?=  $pager;?>
</div>
<script>
    $(function(){
        $('.Shooting').each(function(){
            $(this).change(function(){
                var t = $(this);
                var value = $(this).val();
                var pid = $(this).data('pid');
                console.log(value);
                $.post('<?= URL::site('plan/Shooting') ?>', {
                    pid: pid,
                    val: value
                }, function (res) {
                    console.log(res)

                })
            })
        })
    })

</script>

